How robust is quicksort average complexity?

نویسندگان

  • Suman Kumar Sourabh
  • Soubhik Chakraborty
چکیده

The paper questions the robustness of average case time complexity of the fast and popular quicksort algorithm. Among the six standard probability distributions examined in the paper, only continuous uniform, exponential and standard normal are supporting it whereas the others are supporting the worst case complexity measure. To the question -why are we getting the worst case complexity measure each time the average case measure is discredited? -one logical answer is average case complexity under the universal distribution equals worst case complexity. This answer, which is hard to challenge, however gives no idea as to which of the standard probability distributions come under the umbrella of universality. The morale is that average case complexity measures, in cases where they are different from those in worst case, should be deemed as robust provided only they get the support from at least the standard probability distributions, both discrete and continuous. Regretfully, this is not the case with quicksort.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

How robust are average complexity measures? A statistical case study

Average case analysis forms an interesting and intriguing part of algorithm theory since it explains why some algorithms with bad worst-case complexity can better themselves in performance on the average. Well known examples include the quicksort, simplex method and the wide variety of computer graphics and computational geometry algorithms. Here we make a statistical case study of the robustne...

متن کامل

A numerical analysis of Quicksort: How many cases are bad cases?

We present numerical results for the probability of bad cases for Quicksort, i. e. cases of input data for which the sorting cost considerably exceeds that of the average. Dynamic programming was used to compute solutions of the recurrence for the frequency distributions of comparisons. From these solutions, probabilities of numbers of comparisons above certain thresholds relative to the averag...

متن کامل

Quicksort with median of medians is considered practical

Quicksort[2, 1, 3] is one of the most efficient and widely used sorting algorithms. The major drawback of quicksort is that worst case time complexity of naive implementations of quicksort is O(n2) with input size n. In order to avoid this worst case behavior, a variant of quicksort, so-called introsort[4] 1 , is often used. There exists another solution to keep the worst case complexity of qui...

متن کامل

The Number of Symbol Comparisons in QuickSort and QuickSelect

We revisit the classical QuickSort and QuickSelect algorithms, under a complexity model that fully takes into account the elementary comparisons between symbols composing the records to be processed. Our probabilistic models belong to a broad category of information sources that encompasses memoryless (i.e., independent-symbols) and Markov sources, as well as many unbounded-correlation sources....

متن کامل

A Machine-Checked Proof of the Average-Case Complexity of Quicksort in Coq

As a case-study in machine-checked reasoning about the complexity of algorithms in type theory, we describe a proof of the average-case complexity of Quicksort in Coq. The proof attempts to follow a textbook development, at the heart of which lies a technical lemma about the behaviour of the algorithm for which the original proof only gives an intuitive justification. We introduce a general fra...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • CoRR

دوره abs/0811.4376  شماره 

صفحات  -

تاریخ انتشار 2008